/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.lihle.designpatterns.model.stractural.composite.impl;

import com.lihle.designpatterns.model.stractural.composite.Component;

/**
 *
 * @author user
 */
public class Leaf implements Component{

    
    private String name;
//    
    public Leaf(){}
    public Leaf(String name){
       this.name = name;
    }
    
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void sayHello() {
        System.out.println(getName()+" leaf says hello");
    }

    @Override
    public void sayGoodbye() {
        System.out.println(getName()+" leaf says goodbye");
    }
    
}
